package com.teamcenter.rac.massupdate.validators;

import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;

import com.teamcenter.rac.massupdate.Activator;
import com.teamcenter.rac.massupdate.model.UpdateJobModel;
import com.teamcenter.rac.massupdate.ui.Messages;

public class OperationTypeValidator
  implements IValidator
{
  public IStatus validate(Object paramObject)
  {
    if ((paramObject != null) && (!paramObject.equals(UpdateJobModel.OperationType.NOT_SET))) {
      return Status.OK_STATUS;
    }
    return new Status(2, Activator.getDefault().getBundleSymbolicName(), Messages.Validator_OperationTypeNotSet);
  }
}
